<?php 
namespace Admin\Model;
use Think\Model;
class CategoryModel extends Model{
	public function getCategoryRow(){
        $filed = 'id';
        return $this->field($filed)->count();
	}

	public function getCategoryList($first, $limit){
		 return $this->field('t1.*,t2.cat_name as parent_name')->alias('t1')->join('left join mimall_category as t2 on t1.parent_id = t2.cat_id')->order('sort_order')->where('t1.is_show = 1')->limit($first, $limit)->select();
		 
	}
}